package com.qiu.controller;

import com.qiu.repository.UserRepository;
import com.qiu.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shkstart
 * @date 2020/11/26 - 16:03
 */
@RestController
public class UserController {
    @Autowired
    UserRepository userRepository;

    public void save(User user) {
        userRepository.save(user);
    }


    public User findByName(String name){
        return userRepository.findUser(name);
    }

}
